package com.caishi.lkx.course.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.zzw.common.entity.impl.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "kc_video_handout", autoResultMap = true)
@Schema(title = "视频资料")
public class VideoHandoutModel extends BaseEntity<VideoHandoutModel> {

    /**
     * 科目名称
     */
    private String name;

    /**
     * 格式
     */
    private String type;

    private Integer size;

    private Integer downloadCount;

    private String url;

    private Long videoId;


    @Override
    public int hashCode() {
        return getId().hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof VideoHandoutModel gr) return gr.getId().equals(this.getId());
        return super.equals(obj);
    }





}
